
const db = require("../utils/db")
const util = require("../utils/util")

async function add_star(user_id, post_id) {
    var sql = "Insert into star(user_id, post_id) values(?,?)";
    var args = [user_id, post_id];
    await db.query(sql, args);
}

async function del_star(user_id, post_id) {
    var sql = "Delete from star where user_id=? and post_id=?";
    var args = [user_id, post_id];
    await db.query(sql, args);
}

module.exports = {
    add_star: add_star,
    del_star: del_star,
}
